﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Media;
using System.Windows.Media.Animation;

static class Constants
{
    public const String ButtonStyleNormal = "InformButton";
}

namespace Edutainment
{
    public class ButtonController
    {
        public ArrayList buttons { get; private set; }
        ArrayList clickedButtons = null;
        Style buttonStyle;

        public ButtonController()
        {
            clickedButtons = new ArrayList();
        }

        public void createButtonsWithList(ArrayList sortingList)
        {
            if (sortingList != null && sortingList.Count > 0)
            {
                if (buttons == null)
                {
                    buttons = new ArrayList(sortingList.Count);
                }
                else
                {
                    buttons.Clear();
                }

                foreach (int number in sortingList)
                {
                    ToggleButton tButton = new ToggleButton();
                    //Style bStyle = (Style)App.Current.TryFindResource(Constants.ButtonStyleNormal);
                    //Style a = (Style)((App)App.Current).TryFindResource(Constants.ButtonStyleNormal);
                    //tButton.Style = bStyle;
                    tButton.Content = number;
                    tButton.IsChecked = false;
                    buttons.Add(tButton);
                }
            }
        }


    }

 
}
